
#ifndef __PACKET_H__
#define __PACKET_H__ 

#pragma pack(1)

typedef struct 
{
    char id;
    char password[9];
    char length[10];
    char code[3];
    char buff[65536];
} GPRS_PACKET;

#define GPRS_PACKET_HEADER_LEN  20

#define GRPS_PACKET_LEN(x) (23 + (x) + 1)

#define GPRS_PACKET_END         "#"

#define GRPS_CODE_QUERY_TIME    "810"
#define GRPS_CODE_QUERY_ISSUE   "811"
#define GRPS_CODE_ISSUE_CONF    "812"
#define GPRS_CODE_GET_INFO      "813"

typedef struct
{
    char IMEI[30];
} GPRS_QUERY_TIME_REQ;

typedef struct
{
    char IMEI[20];
} GPRS_QUERY_TIME_RSP;

typedef struct
{
    char mask;
    char IMEI[30];
} GPRS_IM_INFO;

#define GPRS_ISSUE_IMEI          "1"
#define GPRS_ISSUE_IMSI          "2"

#pragma pack()

#endif // __PACKET_H__